#
# Copyright (C) 2023
#
# Brick Yang <printfxxx@163.com>
#
# This program is free software. You can redistribute it and/or
# modify it as you like.
#

mconf_srcs = files('mconf.c', 'zconf.tab.c', 'lxdialog/checklist.c', 'lxdialog/util.c',
		   'lxdialog/inputbox.c', 'lxdialog/textbox.c', 'lxdialog/yesno.c',
		   'lxdialog/menubox.c')

mconf_cflags = ['-Wno-declaration-after-statement', '-Wno-format-overflow', '-Wno-dangling-pointer',
		'-DCURSES_LOC=<ncurses.h>', '-DNCURSES_WIDECHAR=1']

mconf_deps = dependency('ncursesw', native: true)

mconf = executable('mconf', mconf_srcs, c_args: mconf_cflags, dependencies: mconf_deps,
		   native: true, build_by_default: false)

run_target('mconf', command: [mconf, '@SOURCE_ROOT@/Kconfig'], env: menvs)
